import argparse
import numpy as np

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument('--trial_path', help='', type=str, default="data/trials.lst")
    parser.add_argument('--dev_trial_path', help='', type=str, default="data/dev.lst")
    parser.add_argument('--eval_trial_path', help='', type=str, default="data/eval.lst")
    args = parser.parse_args()

    data = np.loadtxt(args.trial_path, str)
    np.random.shuffle(data)

    with open(args.eval_trial_path, "w") as f:
        for item in data[:10000]:
            f.write("{} {} {}\n".format(item[0], item[1], item[2]))

    with open(args.dev_trial_path, "w") as f:
        for item in data[10000:]:
            f.write("{} {} {}\n".format(item[0], item[1], item[2]))

